package com.atshiyou.bean;

import java.util.Objects;

public class Student {
    private int studentid;
    private String studentno;
    private String stuname;
    private int stuage;
    private int gradeid;

    public Student() {
    }

    public Student(int studentid, String studentno, String stuname, int stuage, int gradeid) {
        this.studentid = studentid;
        this.studentno = studentno;
        this.stuname = stuname;
        this.stuage = stuage;
        this.gradeid = gradeid;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Student student = (Student) o;
        return studentid == student.studentid &&
                stuage == student.stuage &&
                gradeid == student.gradeid &&
                Objects.equals(studentno, student.studentno) &&
                Objects.equals(stuname, student.stuname);
    }

    @Override
    public int hashCode() {
        return Objects.hash(studentid, studentno, stuname, stuage, gradeid);
    }

    @Override
    public String toString() {
        return "Student{" +
                "studentid=" + studentid +
                ", studentno='" + studentno + '\'' +
                ", stuname='" + stuname + '\'' +
                ", stuage=" + stuage +
                ", gradeid=" + gradeid +
                '}';
    }

    public int getStudentid() {
        return studentid;
    }

    public void setStudentid(int studentid) {
        this.studentid = studentid;
    }

    public String getStudentno() {
        return studentno;
    }

    public void setStudentno(String studentno) {
        this.studentno = studentno;
    }

    public String getStuname() {
        return stuname;
    }

    public void setStuname(String stuname) {
        this.stuname = stuname;
    }

    public int getStuage() {
        return stuage;
    }

    public void setStuage(int stuage) {
        this.stuage = stuage;
    }

    public int getGradeid() {
        return gradeid;
    }

    public void setGradeid(int gradeid) {
        this.gradeid = gradeid;
    }
}
